#include "patientupload.h"
#include "ui_patientupload.h"

PatientUpload::PatientUpload(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::PatientUpload)
{
    ui->setupUi(this);
}

PatientUpload::~PatientUpload()
{
    delete ui;
}

void PatientUpload::on_pushButton_selectPic_clicked()
{
    QString filePath=QFileDialog::getOpenFileName(this,"选择一张图片",
                                 "",
                                 "图片文件 (*.png *.jpg *.jpeg *.gif) ;; 所有文件 (*.*)");
    QImage img(filePath);
    img=img.scaled(ui->label_displayPic->size(),Qt::KeepAspectRatio, Qt::SmoothTransformation);
    ui->label_displayPic->setPixmap(QPixmap::fromImage(img));
}
